package com.xuetang9.t9.xinhuaxia.beans;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;
import javax.persistence.*;

@Table(name = "user_orderlist")
public class UserOrderlist {
    /**
     * 订单编号id
     */
    @Id
    @Column(name = "uo_orderId")
    private Long uoOrderid;

    /*订单详情*/
    private List<Orderlist> orderlists;
    /**
     * 用户ID
     */
    @Column(name = "uo_userId")
    private Long uoUserid;

    private User user;
    /**
     * 下单时间
     */
    @Column(name = "uo_orderTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date uoOrdertime;

    /**
     * 发货时间
     */
    @Column(name = "uo_shipmentsTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date uoShipmentstime;

    /**
     * 到货时间
     */
    @Column(name = "uo_arrivalTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date uoArrivaltime;

    /**
     * 确认收货时间
     */
    @Column(name = "uo_confirmReceiptTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date uoConfirmreceipttime;

    /**
     *  "未付款","已付款","待发货","已发货","运输中","已送达","已签收","售后中"
     */
    @Column(name = "uo_orderStatus")
    private Integer uoOrderstatus;

    /**
     * 售后状态（"待售后","待审核","待入库","待退款","待换货","售后成功"）
     */
    @Column(name = "uo_saledStatus")
    private Integer uoSaledstatus;

    @Override
    public String toString() {
        return "UserOrderlist{" +
                "uoOrderid=" + uoOrderid +
                ", orderlists=" + orderlists +
                ", uoUserid=" + uoUserid +
                ", user=" + user +
                ", uoOrdertime=" + uoOrdertime +
                ", uoShipmentstime=" + uoShipmentstime +
                ", uoArrivaltime=" + uoArrivaltime +
                ", uoConfirmreceipttime=" + uoConfirmreceipttime +
                ", uoOrderstatus=" + uoOrderstatus +
                ", uoSaledstatus=" + uoSaledstatus +
                '}';
    }

    public List<Orderlist> getOrderlists() {
        return orderlists;
    }

    public void setOrderlists(List<Orderlist> orderlists) {
        this.orderlists = orderlists;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    /**
     * 获取订单编号id
     *
     * @return uo_orderId - 订单编号id
     */
    public Long getUoOrderid() {
        return uoOrderid;
    }

    /**
     * 设置订单编号id
     *
     * @param uoOrderid 订单编号id
     */
    public void setUoOrderid(Long uoOrderid) {
        this.uoOrderid = uoOrderid;
    }

    /**
     * 获取用户ID
     *
     * @return uo_userId - 用户ID
     */
    public Long getUoUserid() {
        return uoUserid;
    }

    /**
     * 设置用户ID
     *
     * @param uoUserid 用户ID
     */
    public void setUoUserid(Long uoUserid) {
        this.uoUserid = uoUserid;
    }

    /**
     * 获取下单时间
     *
     * @return uo_orderTime - 下单时间
     */
    public Date getUoOrdertime() {
        return uoOrdertime;
    }

    /**
     * 设置下单时间
     *
     * @param uoOrdertime 下单时间
     */
    public void setUoOrdertime(Date uoOrdertime) {
        this.uoOrdertime = uoOrdertime;
    }

    /**
     * 获取发货时间
     *
     * @return uo_shipmentsTime - 发货时间
     */
    public Date getUoShipmentstime() {
        return uoShipmentstime;
    }

    /**
     * 设置发货时间
     *
     * @param uoShipmentstime 发货时间
     */
    public void setUoShipmentstime(Date uoShipmentstime) {
        this.uoShipmentstime = uoShipmentstime;
    }

    /**
     * 获取到货时间
     *
     * @return uo_arrivalTime - 到货时间
     */
    public Date getUoArrivaltime() {
        return uoArrivaltime;
    }

    /**
     * 设置到货时间
     *
     * @param uoArrivaltime 到货时间
     */
    public void setUoArrivaltime(Date uoArrivaltime) {
        this.uoArrivaltime = uoArrivaltime;
    }

    /**
     * 获取确认收货时间
     *
     * @return uo_confirmReceiptTime - 确认收货时间
     */
    public Date getUoConfirmreceipttime() {
        return uoConfirmreceipttime;
    }

    /**
     * 设置确认收货时间
     *
     * @param uoConfirmreceipttime 确认收货时间
     */
    public void setUoConfirmreceipttime(Date uoConfirmreceipttime) {
        this.uoConfirmreceipttime = uoConfirmreceipttime;
    }

    /**
     * 获取 (1代付款、2已发货、3到发、4货已取消、5售后中、6订购)
     *
     * @return uo_orderStatus -  (1代付款、2已发货、3到发、4货已取消、5售后中、6订购)
     */
    public Integer getUoOrderstatus() {
        return uoOrderstatus;
    }

    /**
     * 设置 (1代付款、2已发货、3到发、4货已取消、5售后中、6订购)
     *
     * @param uoOrderstatus  (1代付款、2已发货、3到发、4货已取消、5售后中、6订购)
     */
    public void setUoOrderstatus(Integer uoOrderstatus) {
        this.uoOrderstatus = uoOrderstatus;
    }

    /**
     * 获取售后状态（1待审核、2待入库、3待退款、4待换货、5售后成功）
     *
     * @return uo_saledStatus - 售后状态（1待审核、2待入库、3待退款、4待换货、5售后成功）
     */
    public Integer getUoSaledstatus() {
        return uoSaledstatus;
    }

    /**
     * 设置售后状态（1待审核、2待入库、3待退款、4待换货、5售后成功）
     *
     * @param uoSaledstatus 售后状态（1待审核、2待入库、3待退款、4待换货、5售后成功）
     */
    public void setUoSaledstatus(Integer uoSaledstatus) {
        this.uoSaledstatus = uoSaledstatus;
    }

}